import { Boot } from '@wangeditor/editor';

import renderMentionConf from '../module/mention/render-elem';
import mentionToHtmlConf from '../module/mention/elem-to-html';
import parseMentionHtmlConf from '../module/mention/parse-elem-html';
import withMention from '../module/mention/plugin';

import withLinkCard from '../module/converToLinkCard/plugin';
import renderLinkCardConf from '../module/converToLinkCard/render-elem';
import linkCardToHtmlConf from '../module/converToLinkCard/elem-to-html';
import parseLinkCardHtmlConf from '../module/converToLinkCard/parse-elem-html';

function registerNode() {
  Boot.registerRenderElem(renderMentionConf);
  Boot.registerElemToHtml(mentionToHtmlConf);
  Boot.registerParseElemHtml(parseMentionHtmlConf);
  Boot.registerPlugin(withMention);
  Boot.registerRenderElem(renderLinkCardConf);
  Boot.registerElemToHtml(linkCardToHtmlConf);
  Boot.registerParseElemHtml(parseLinkCardHtmlConf);
  Boot.registerPlugin(withLinkCard);
}

export default registerNode;
